package cloud.lysky.game.gamesampe.entity;

import com.almasb.fxgl.entity.Entity;
import com.google.common.collect.Lists;
import io.swagger.v3.oas.annotations.media.Schema;
import javafx.scene.paint.Color;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.UUID;

@Getter
@Setter
@Schema(description = "敌人类")
@AllArgsConstructor
public class Enemy extends Entity {
    @Schema(description = "代码")
    private String code;

    @Schema(description = "名称")
    private String name;
    @Schema(description = "生命值")
    private int HP;
    @Schema(description = "法力值")
    private int MP;
    @Schema(description = "攻击力")
    private int ATK;
    @Schema(description = "防御力")
    private int defense;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "拥有的技能列表")
    private List<Skill> skills;

    public static Enemy buildSimpleEnemy(String name, int HP, int MP, int ATK, int defense) {
        UUID uuid = UUID.randomUUID();
        String code = uuid.toString().substring(0, 8);
        return new Enemy(code, name, HP, MP, ATK, defense, null, Lists.newArrayList(Skill.basic("野蛮冲撞")));
    }
}
